<template>
    <div>
        <Card dis-hover :style="{minHeight: height+'px'}">
            <div class="title" slot="title">
                <div>
                    <Icon :type="icon" class="icon"/>
                    {{title}}
                </div>
            </div>
            <div class="button-list">
                <div class="card" v-for="item in list">
                    <div class="box">
                        <Icon :type="item.type" class="icon"/>
                        {{item.title}}
                    </div>
                </div>
            </div>
        </Card>
    </div>
</template>

<script>
    export default {
        name: "fast-box",
        props: {
            height: {
                type: Number,
                default: 300
            },
            title: {
                type: String,
                default: "标题"
            },
            list: {
                type: Array,
                default: []
            },
            icon: {
                type: String,
                default: "md-arrow-dropdown-circle"
            }
        }
    }
</script>

<style scoped>
    /deep/ .ivu-card-head {
        background: url('../assets/img/03.jpg') repeat;
    }

    .icon {
        font-size: 18px;
        color: #fff;
    }

    .title {
        font-size: 16px;
        display: flex;
        justify-content: space-between;
        color: #fff;
    }

    .button-list {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        flex-direction: row;
    }

    .button-list .card {
        width: 48%;
        margin-bottom: 10px;
    }

    .button-list .card .box {
        background-color: #2d8cf0;
        width: 100%;
        height: 90px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #fff;
        padding-top: 10px;
    }

    .button-list .card .box .icon {
        font-size: 50px;
    }
</style>